package com.kms.service;

import java.util.List;

import org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer;

import com.kms.dao.SystemparameterDAO;
import com.kms.model.MGroup;
import com.kms.model.MSyspara;
import com.kms.util.CoreUtil;

public class SystemparameterServiceImpl implements SystemparameterService{

	public SystemparameterDAO getSysparaDAO() {
		return sysparaDAO;
	}

	public void setSysparaDAO(SystemparameterDAO sysparaDAO) {
		this.sysparaDAO = sysparaDAO;
	}

	private SystemparameterDAO sysparaDAO;

	public void deleteSyspara(String id) {
		sysparaDAO.deleteSyspara(id);
	}

	public void deletemGroup(String id) {
		sysparaDAO.deletemGroup(id);
	}

	public void insertSyspara(MSyspara sysp) {
		sysparaDAO.insertSyspara(sysp);
	}

	public void insertmGroup(MGroup group) {
		sysparaDAO.insertmGroup(group);
	}

	public List<MSyspara> selectListmSyspara(MSyspara sysp) {
		// TODO Auto-generated method stub
		return null;
	}

	public List<MSyspara> selectListmmGroup(MGroup group) {
		return sysparaDAO.selectListmmGroup(group);
	}

	public MGroup selectmGroup(String id) {
		return sysparaDAO.selectmGroup(id);
	}

	public MSyspara selectmSyspara(int id) {
		return sysparaDAO.selectmSyspara(id);
	}

	public void updateSyspara(MSyspara sysp) {
		this.sysparaDAO.updateSyspara(sysp);
	}

	public void updatemGroup(MGroup group) {
		this.sysparaDAO.updatemGroup(group);
	}

	public DataFieldMaxValueIncrementer getSeq_mgroup_id() {
		return this.sysparaDAO.getSeq_mgroup_id();
	}

	public void insertsyspara(MGroup group,MSyspara sysp) {
		String seq_mgroup =CoreUtil.getUID();
		group.setId(seq_mgroup);
		sysp.setMgid(seq_mgroup);
		sysparaDAO.insertmGroup(group);
		sysparaDAO.insertSyspara(sysp);
	}

	public List<MGroup> selectAllMGroup() {
		return sysparaDAO.selectAllMGroup();
	}
}
